<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserAuthenticationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_authentication', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('uid')->index()->comment('用户id');
            $table->unsignedTinyInteger('type')->default(1)->comment(' 用户类型   0:服务站管理员  1:网点管理员  2:快递员  3:用户');
            $table->string('heads_path')->nullable()->comment('实名认证图片正面');
            $table->string('tails_path')->nullable()->comment('实名认证图片反面');
            $table->unsignedTinyInteger('status')->default(1)->comment(' 状态   0:认证不通过 1:认证通过');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_authentication');
    }
}
